package com.sx.pipeline.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.Lifecycle
import androidx.viewpager2.adapter.FragmentStateAdapter

/**
 * @Author: YY
 * @Date: 2022/5/18
 * @Description: TODO
 */
class ViewPagerFmAdapter(
    manager: FragmentManager,
    lifecycle: Lifecycle,
    private val mFragments: List<Fragment>,
): FragmentStateAdapter(manager, lifecycle) {

    override fun getItemCount(): Int {
        return mFragments.size
    }

    override fun createFragment(position: Int): Fragment {
        return mFragments[position]
    }

}